<?php 
use_stylesheet('list.css');
use_helper('toolsbar');
slot('Toolsbar');
   echo setToolbar('index','powerdev');
end_slot();

slot('PageTitle',"Power Devices");
slot('Title',"Power Devices Overview");

$powerdevs=$pager->getResults();
include_partial("list", array("powerdevs"=>$powerdevs))

?>

<?php if ($pager->haveToPaginate()): ?>
        <div class="pagination">&nbsp; 
        <a href="<?php echo url_for('powerdev') ?>?page=1"><<</a>&nbsp; 
        <a href="<?php echo url_for('powerdev') ?>?page=<?php echo$pager->getPreviousPage() ?>"><</a>&nbsp; 
        <?php foreach ($pager->getLinks() as $page): 
                if ($page == $pager->getPage()): 
                    echo $page;
                else: ?>
                    <a href="<?php echo url_for('powerdev') ?>?page=<?php echo $page ?>"><?php echo $page ?></a>
        <?php endif;
            endforeach; ?>
                        
                    &nbsp; <a href="<?php echo url_for('powerdev') ?>?page=<?php echo $pager->getNextPage() ?>">></a>&nbsp; 
        <a href="<?php echo url_for('powerdev') ?>?page=<?php echo $pager->getLastPage() ?>">>></a>&nbsp; 
        </div>
<?php endif; ?>

<div class="pagination">
<strong><?php echo count($pager) ?></strong> total Power Devices
<?php if ($pager->haveToPaginate()): ?>
- page <strong><?php echo $pager->getPage() ?>/<?php echo $pager->getLastPage() ?></strong>
<?php endif; ?>
</div>
